<head>
<style type="text/css">
.hidden{
	display: none;
}
table.display tbody td
{
	word-break: break-all !important;
	word-wrap: break-word !important;
	text-overflow: ellipsis !important;
	overflow: hidden !important;
	-ms-word-break: break-all;
     word-break: break-all;
     word-break: break-word;
	-webkit-hyphens: auto;
   -moz-hyphens: auto;
        hyphens: auto;
	white-space: normal !important;
	vertical-align: middle !important;
}

#box-table-b
{
	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
	font-size: 12px;
	text-align: center;
	border-collapse: collapse;
	border-top: 7px solid #71A9D3;
	border-bottom: 7px solid #71A9D3;
}
#box-table-b th
{
	font-size: 13px;
	font-weight: normal;
	padding: 8px;
	background: #e8edff;
	border-right: 1px solid #71A9D3;
	border-left: 1px solid #71A9D3;
	color: #039;
}
#box-table-b td
{
	padding: 8px;
	background: #e8edff; 
	border-right: 1px solid #71A9D3;
	border-left: 1px solid #71A9D3;
	color: #669;
}
</style>
<script src="js/highcharts.js"></script>
<script src="js/exporting.js"></script>
<script type="text/javascript">
		var aJaxURL	= "server-side/report/biling.action.php";		//server side folder url
		var tName	= "example";										//table name
		var fName	= "add-edit-form";		
		var tbName	= "tabs";							//form name s
		var file_name = '';
		var rand_file = '';

		$(document).ready(function () {			
			GetDate("search_start_my");
			GetDate("search_end_my");

			start = $("#search_start_my").val();
			end = $("#search_end_my").val();
			LoadTable(start,end);
			SetEvents("", "", "", "example", "add-edit-form", "server-side/call/outgoing/outgoing_tab0.action.php");
		});
		
		function LoadTable(start,end){
			var total=[10,11,12];
			if ($('#miznobrivi').is(':checked')) {
			    mizn = 1;
			}else{
				mizn = 0;
			}
			GetDataTable(tName, aJaxURL, "get_list&start="+start+"&end="+end+"&mizn="+mizn, 13, "", 0, "", 1, "desc", total);
		}

		$(document).on("change", "#search_end_my", function () {
			start = $("#search_start_my").val();
			end = $("#search_end_my").val();
			LoadTable(start,end);
		});

		$(document).on("change", "#search_start_my", function () {
			start = $("#search_start_my").val();
			end = $("#search_end_my").val();
			LoadTable(start,end);
		});

		function LoadDialog(fName){
			var button = {					
		        	"cancel": {
			            text: "დახურვა",
			            id: "cancel-dialog",
			            click: function () {
			            	$(this).dialog("close");
			            }
			        } 
			    };
			GetDialog("add-edit-form", 970, "auto", button);
			$(".download").button({
	            
		    });
		}

		$(document).on("change", "#miznobrivi", function () {
			start = $("#search_start_my").val();
			end = $("#search_end_my").val();
			var total=[10,11,12];
			if ($('#miznobrivi').is(':checked')) {
			    mizn = 1;
			}else{
			    mizn = 0;
			}
			GetDataTable(tName, aJaxURL, "get_list&start="+start+"&end="+end+"&mizn="+mizn, 13, "", 0, "", 1, "desc", total);
		});

		$(document).on("click", ".download", function () {
            var link = $(this).attr("str");
            
            if($("#server_id").val() == 1){
                link = "http://217.11.163.234:8181/" + link;
            }else{
            	link = "http://212.72.155.176:8282/records/" + link;
            }

            var newWin = window.open(link, "JSSite", "width=420,height=230,resizable=yes,scrollbars=yes,status=yes");
            newWin.focus();
        });
    </script>
</head>

<body>
    <div style="width: 90%; margin: auto;">
            	<h2 align="center" >გამავალი ზარი</h2>
            	<div id="button_area" style="margin-top: 50px;">
            		<div class="right" style="">
	            		<label for="search_end_my" class="left" style="margin: 5px 0 0 9px;">დასასრული</label>
	            		<input style="width: 100px; margin-left: 5px; height: 18px;" type="text" name="search_end_my" id="search_end_my" class="inpt right" />
            		</div>
	            	<div class="right" style="width: 200px;">
	            		<label for="search_start_my" class="left" style="margin: 5px 0 0 9px;">დასაწყისი</label>
	            		<input style="width: 100px; margin-left: 5px; height: 18px;" type="text" name="search_start_my" id="search_start_my" class="inpt right"/>
	            	</div>
	            	<div class="right" style="width: 130px; padding: 5px;">
	            	  <label for="miznobrivi">მიზნობრივი</label>	     
	            	  <input type="checkbox" id="miznobrivi">       	
	            	</div>
            	</div>
            	
                <table class="display" id="example" style="width: 100%;">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 100%;">თარიღი</th>
                            <th style="width: 100%;">ოპერატორი</th>
                            <th style="width: 100%;">სახელი და გვარი</th>
                            <th style="width: 100%;">ტელეფონი</th>
                            <th style="width: 60%;">18+</th>
                            <th style="width: 60%;">მწეველი</th>
                            <th style="width: 100%;">ვებ-გვერდზე რეგისტრირებული</th>
                            <th style="width: 100%;">ზარის დაზუსტება</th>   
                            <th style="width: 50%;">ხ-ბა</th>  
                            <th style="width: 50%;">ხ-ბა (წმ)</th>
                            <th style="width: 50%;">ღ-ბა 1</th>  
                            <th style="width: 50%;">ღ-ბა 2</th>
                        </tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" style=""/>
                            </th>
                            <th>
                            	<input style="width: 120px;" type="text" name="search_number" value="ფილტრი" class="search_init" style=""></th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 120px;"/>
                            </th>    
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 120px;"/>
                            </th>    
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 120px;"/>
                            </th>    
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 70px;"/>
                            </th>  
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 70px;"/>
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 70px;"/>
                            </th>
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 120px;"/>
                            </th>   
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 70px;"/>
                            </th>  
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 70px;"/>
                            </th>  
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 70px;"/>
                            </th> 
                            <th>
                                <input type="text" name="search_date" value="ფილტრი" class="search_init" style="width: 70px;"/>
                            </th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr id="datatable_header" class="search_header">
							<th style="width: 150px"></th>							
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
							<th style="width: 150px"></th>
                        </tr>
                        </tfoot>
                </table>
                <div id="chart_container1" style="float:left; width: 100%; height: 400px;"></div>   
                <div id="chart_container2" style="float:left; width: 50%; height: 400px;"></div> 
                <div id="chart_container3" style="float:left; width: 50%; height: 400px;"></div> 
	            
	</div>  


    <!-- jQuery Dialog -->
    <div  id="add-edit-form" class="form-dialog" title="გამავალი ზარი">
	</div>

</body>